﻿using ECommerce.Web.Models;

namespace ECommerce.Web.NHibernate.Mappings.EntityMappings
{
    public class BasketMap : EntityMap<Basket>
    {
        public BasketMap()
        {
            Map(x => x.DateIssued).Not.Nullable();
            Map(x => x.LastDateContentsChanged);

            HasOne(x => x.Shopper).PropertyRef(x => x.Basket);

            HasMany(x => x.Items);
        }
    }
}
